function surveyMethod($scope, $route, CertusFormAjax, CertusJsonAjax, $location, $http){
    $scope.survey = {};
    CertusFormAjax.ajax("surveys",{"param":$scope.searchInput},function(response){
        $scope.surveys = response.data;
    })
    // $http({
    //     url: base+'/surveys',
    //     method: 'POST',
    //     data:$scope.survey,
    //     headers: {
    //         'Accept': '*/*',
    //         'Content-Type': 'application/json'
    //     }
    // }).then(function(response){
    //     $scope.surveys = response.data;
    // })



    $scope.updateContent = function () {
        if($scope.survey==null||angular.equals({}, $scope.survey)) {
            // 为空
        }else{
            CertusJsonAjax.ajax("surveySave",$scope.survey,function(response){
                clear();
                CertusJsonAjax.ajax("surveys",{"param":$scope.searchInput},function(response){
                    $scope.surveys = response.data;
                })
            })
        }
    }

    var clear = function(){
        $scope.survey = {};
    }

    $scope.clear = clear;
}


